home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / src / xconq-7.1.0 / x11 / x2imf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-07  |  1.1 KB  |  46 lines  |  [TEXT/R*ch]

  1. /* This program converts a collection of X bitmaps into imf format.
  2.    Copyright (C) 1992, 1993, 1994, 1995 Stanley T. Shebs.
  3.  
  4. Xconq is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.  See the file COPYING.  */
  8.  
  9. #include "config.h"
  10. #include "misc.h"
  11. #include "lisp.h"
  12. #include "imf.h"
  13. #include "xutil.h"
  14.  
  15. #include <string.h>
  16.  
  17. extern int numimages;
  18.  
  19. extern ImageFamily **images;
  20.  
  21. char tmpbuf[500];
  22.  
  23. int
  24. main(argc, argv)
  25. int argc;
  26. char *argv[];
  27. {
  28.     int i;
  29.  
  30.     for (i = 1; i < argc; ++i) {
  31.     if (!read_any_file(argv[i], NULL)) {
  32.         fprintf(stderr, "Couldn't read \"%s\"\n", argv[i]);
  33.     }
  34.     }
  35.     sort_all_images();
  36.     /* Now write out all the images that were read. */
  37.     for (i = 0; i < numimages; ++i) {
  38.     reverse_rawdata(images[i]);
  39.     /* Note that the generic image data slots were filled in upon
  40.        bitmap reading, so the images are ready to write out. */
  41.     fprintf(stderr, "; %s\n", images[i]->name);
  42.     write_imf(stdout, images[i]);
  43.     }
  44.     return 0;
  45. }
  46.